<template>
  <div class="box">
      <header class="header">购物车</header>
      <div class="content">
        <ul>
          <li v-for="item of bannerList" :key="item.bannerid">
            <img :src="item.img" alt="">
          </li>
        </ul>
        <ul>
          <li v-for="item of proList" :key="item.proid">
            {{ item.proname }}
          </li>
        </ul>
      </div>
    </div>
</template>
<script>
import { mapState, mapActions } from 'vuex'
export default {
  mounted () {
    console.log(this)
    this.getBannerListAction()
    this.getProListAction()
  },
  methods: {
    ...mapActions({
      getBannerListAction: 'home/getBannerListAction',
      getProListAction: 'home/getProListAction'
    })
  },
  computed: {
    ...mapState({
      bannerList: state => state.home.bannerList,
      proList: state => state.home.proList
    })
  }
}
</script>
